package com.cff.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Properties;

import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.swing.AbstractButton;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.text.JTextComponent;

import com.cff.common.Constant;
import com.cff.common.SimpleFrame;
import com.cff.util.EventUtil;
import com.cff.util.FileUtil;
import com.cff.util.SignTools;

public class AboutHelpActionListener implements ActionListener {
	private static Properties confPro = null;
	
	public AboutHelpActionListener() {
		super();
	}


	@Override
	public void actionPerformed(ActionEvent e) {
		confPro = FileUtil.getInstance();
		JFrame tmpFrame = new JFrame();
		tmpFrame.setBounds(100, 100, 600, 400);
		tmpFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		tmpFrame.setLayout(null);
		tmpFrame.setTitle(confPro.getProperty("aboutTitle"));
		
		JLabel label1 = new JLabel();
		label1.setBounds(80, 10, 80, 50);
		label1.setText(confPro.getProperty("aboutDesc1"));
		JLabel label2 = new JLabel();
		label2.setBounds(220, 10, 180, 50);
		label2.setText(confPro.getProperty("avoutVal1"));
		JLabel label3 = new JLabel();
		label3.setBounds(420, 10, 180, 50);
		label3.setText(confPro.getProperty("avoutVal11"));
		
		JTextField portText1 = new JTextField();
		portText1.setBounds(60, 80, 60, 30);
		portText1.setText(confPro.getProperty("aboutDesc2"));
        JTextField macText1 = new JTextField();
        macText1.setBounds(170, 80, 180, 30);
        macText1.setText(confPro.getProperty("avoutVal2"));
        JLabel routeLabel1 = new JLabel();
        routeLabel1.setBounds(420, 70, 180, 50);
        routeLabel1.setText(confPro.getProperty("avoutVal21"));
		
        
        JTextField portText2 = new JTextField();
        portText2.setBounds(60, 130, 60, 30);
        portText2.setText(confPro.getProperty("aboutDesc3"));
        JTextField macText2 = new JTextField();
        macText2.setBounds(170, 130, 180, 30);
        macText2.setText(confPro.getProperty("avoutVal31"));
        JLabel routeLabel2 = new JLabel();
        routeLabel2.setBounds(420, 120, 180, 50);
        routeLabel2.setText(confPro.getProperty("avoutVal31"));
        
        JTextField portText3 = new JTextField();
        portText3.setBounds(60, 180, 60, 30);
        portText3.setText(confPro.getProperty("aboutDesc4"));
        JTextField macText3 = new JTextField();
        macText3.setBounds(170, 180, 180, 30);
        macText3.setText(confPro.getProperty("avoutVal41"));
        JLabel routeLabel3 = new JLabel();
        routeLabel3.setBounds(420, 170, 180, 50);
        routeLabel3.setText(confPro.getProperty("avoutVal41"));
		
		tmpFrame.add(label1);
		tmpFrame.add(label2);
		tmpFrame.add(label3);
		tmpFrame.add(portText1);
		tmpFrame.add(portText2);
		tmpFrame.add(portText3);
		tmpFrame.add(macText1);
		tmpFrame.add(macText2);
		tmpFrame.add(macText3);
		tmpFrame.add(routeLabel1);
		tmpFrame.add(routeLabel2);
		tmpFrame.add(routeLabel3);
		tmpFrame.setVisible(true);
		
	}

}
